#include "Element_Base.h"

#include "Node_Base.h"

void Element_Base::getDOFs(std::vector<int>& DOFs)
{
    auto nDOFNode = getDOFNode();
    auto nDOFElement = m_pNode.size() * nDOFNode;
    DOFs.resize(nDOFElement);

    int k = 0;
    for (auto& a : m_pNode)
    {
        auto pNode = a.lock();
        for (int i = 0; i < nDOFNode; i++)
        {
            DOFs[k++] = pNode->m_DOF[i];
        }
    }
}
